#include<iostream>
#include<string.h> 
using namespace std;
int main(void){
	int N = 0;
    string classmates[100] = "";
    cin>>N;
    string longest = "";
    for(int i = 0;i < N;i++){
   		cin>>classmates[i]; 
        if(classmates[i].size() > longest.size()){
            longest = classmates[i];
        }
    }
    cout<<longest;
	return 0;
}
